package com.citycloud.ccuap.tc.admin.repository;

import com.citycloud.ccuap.commons.sys.entity.SysGroup;
import org.springframework.data.mybatis.repository.support.MybatisRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 项目机构数据库操作
 * @author sufeng
 *
 */

@Repository("sysProjectGroupRepository")
public interface SysProjectGroupRepository extends  MybatisRepository<SysGroup, Long> {

	List<SysGroup> findByPidNullAndOrgGuidNotNullAndDataStatusOrderByOrderNo(int i);

	SysGroup findByOrgGuid(String guid);

	Long countByPidAndOrgGuidNotNullAndDataStatus(Long groupId, int i);

	List<SysGroup> findByPidAndOrgGuidNotNullAndDataStatusOrderByOrderNo(Long groupId, int i);

	SysGroup findByGroupId(Long groupId);

	List<SysGroup> findByPid(Long pid);

	SysGroup findByGroupNo(String groupNo);

	

}